package com.fix.web;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.fix.entity.Student;


@Controller
@RequestMapping("/api/student")
public class HelloController {
	
	@RequestMapping(method = RequestMethod.GET)
	public String helloGet(Integer stid) {
		System.out.println("----get 请求"+stid);
		return "hello";
	}
	
	@RequestMapping(method = RequestMethod.POST)
	public String helloPost(Student st) {
		System.out.println("----post 请求"+st);
		return "hello";
	}
	
	@RequestMapping(method = RequestMethod.PUT)
	public String helloPut(@RequestBody Student st) {
		System.out.println("----put 请求"+st);
		return "hello";
	}
	
	@RequestMapping(method = RequestMethod.DELETE)
	public String helloDelete(@RequestBody Student st) {
		System.out.println("----delete 请求"+st);
		return "hello";
	}

}
